# -*- coding:utf-8 -*-
"""
Author：Administrator
Date:2021年10月12日
"""
import pandas as pd

path = '../数据文件/课件021/替换.xlsx'

data = pd.read_excel(path)

# data1 = data.replace('城八区', '海淀区')
# data['数值'].replace(['A', 'B'], [20, 30], inplace=True)
# dict = {'A':20, 'B':30}
# data['数值'].replace(dict, inplace=True)
data['数值'].replace(['A', 'B'], 30, inplace=True)

print(data)
# print(data1)